﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ComDevFx.Arch.Base.Logger;
using ComDevFx.Arch.Base.Persister;

namespace Apodidae.Core.Imp
{
    public class FileLogService : ServiceBase, IFileLogService
    {
        private LoggerManger _loggerManger;
        protected override void PrepareInternal()
        {
            _loggerManger = new LoggerManger("Apodidae.Core.Imp.Biz"); //config this name in log4net.config file
        }

        public void AddLog(RuntimeLogType logType, Type type, string log)
        {
            _loggerManger.AddLog(logType, string.Format("{0} {1}", type != null ? type.FullName : "", log));
        }
    }
}
